<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
function executeSqlQuery($sqlQuery)
{
    require 'dbConnection.php';
    $recordSet = mysql_query($sqlQuery);
    if(!$recordSet)
    {
        trigger_error("Query Error", E_USER_ERROR);
        exit();
    }
    else
    {
        return $recordSet;
    }
}

function executeSqlNonQuery($sqlNonQuery)
{
    require 'dbConnection.php';
    $recordSet = mysql_query($sqlNonQuery);
    if(!$recordSet)
    {
        trigger_error("Query Error", E_USER_ERROR);
        exit();
    }
    else
    {
        return $recordSet;
    }
}

function closeDbConnection()
{
    mysql_close($dbConnection);
}
?>
